//
//  HomeGoodsDetailSectionView2.m
//  测试10-20
//
//  Created by Yasin on 2018/10/20.
//  Copyright © 2018年 ZhiYuan Network. All rights reserved.
//

#import "HomeGoodsDetailSectionView2.h"
@interface HomeGoodsDetailSectionView2()
/**bgview*/
@property (nonatomic, strong) UIView *bgView;
@end

@implementation HomeGoodsDetailSectionView2
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupView];
    }
    return self;
}
- (void)setupView {
    [self addSubview:self.bgView];
    [self.bgView addSubview:self.titleLb];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self);
    }];
    [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.bgView.mas_left).offset(15);
        make.centerY.equalTo(self.bgView.mas_centerY);
        make.size.mas_equalTo(CGSizeMake(200, 30));
    }];
}


#pragma mark - mark  三 geter

- (UILabel *)titleLb {
    if (!_titleLb) {
        _titleLb = [UILabel new];
        _titleLb.numberOfLines = 0;
//        _titleLb.font = [UIFont systemFontOfSize:14.0];
    }
    return _titleLb;
}

- (UIView *)bgView {
    if (!_bgView) {
        _bgView = [UIView new];
        _bgView.backgroundColor = kMainLightGrayColor;
    }
    return _bgView;
}
@end
